import request from '@/utils/request';
// 从vuex中读取
import store from '@/store'

//分页查询banner
export const getBannerPage = (current, limit) => {
    return request({
        url: '/web/banner-admin/pageBanner/' + current + '/' + limit + '/' + store.getters.companyId,
        method: 'get',
    })
}
//新增banner
export const addBanner = (params) => {
    return request({
        url: '/web/banner-admin/addBanner',
        method: 'post',
        data: params
    })
}
//修改banner
export const modifyBanner = (params) => {
    return request({
        url: '/web/banner-admin/updateBanner',
        method: 'post',
        data: params
    })
}
//根据id删除banner
export const removeBanner = (id) => {
    return request({
        url: '/web/banner-admin/remove/' + id,
        method: 'delete',
    })
}
//修改图片水印
export const modifyWatermark = (params) => {
    return request({
        url: '/coursewareOss/addWatermarkForImage',
        method: 'post',
        data: params
    })
}